package com.diandian.backend.kuaishou.life.exchange.mapper;

import com.diandian.backend.kuaishou.life.exchange.domain.KuaishouLifeToken;
import com.diandian.backend.kuaishou.life.exchange.dto.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface KuaishouLifeTokenMapper {

    // 查询记录数
    Integer getCount(@Param("data") KuaishouLifeTokenPageParamDTO requestDTO);

    // 查询分页中的数据集合
    List<KuaishouLifeToken> getPage(@Param("data") KuaishouLifeTokenPageParamDTO requestDTO, @Param("pageSize") Integer pageSize, @Param("offset") Integer offset);

    // 查询详情
    KuaishouLifeToken getDetail(@Param("data") KuaishouLifeTokenDetailParamDTO requestDTO);

    // 根据数据id更新记录
    void updateById(@Param("data") KuaishouLifeTokenUpdateByIdParamDTO param);

    // 根据数据id删除记录
    void deleteById(@Param("data") KuaishouLifeTokenDeleteByIdParamDTO param);

    void deleteByAppKeyAndMerchantId(@Param("appKey") String appKey, @Param("merchantId") String merchantId);

    // 新增
    void add(@Param("data") KuaishouLifeTokenAddParamDTO param);

    // 查询数据集合
    List<KuaishouLifeToken> getList(@Param("data") KuaishouLifeTokenListParamDTO requestDTO);

}